package com.work.mybatis.mapper;

import com.work.mybatis.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import javax.swing.plaf.ListUI;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:DELL
 * Date:2025-05-23
 * Time:22:45
 */
@Mapper
public interface UserInfoXmlMapper {
    //增
    Integer insert(UserInfo userInfo);

    //删
    Integer delete(Integer id);

    //改
    Integer update(UserInfo userInfo);

    //查
    List<UserInfo> selectUserAll();

    //指定映射关系
    List<UserInfo> selectUserAll2();

    //动态的做法--元素的拼接
    //插入
    Integer insertByCondition(UserInfo userInfo);

    //查询语句根据where条件拿到
    List<UserInfo> queryUserByCondition(UserInfo userInfo);

    //更新
    Integer updateByCondition(UserInfo userInfo);

    //Foreach批量删除
    Integer batchDelete(List<Integer> ids);
}
